import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {LoginPage} from "../login/login";
import {PublicProvider} from "../../providers/public/public";

/**
 * Generated class for the StartPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-start',
  templateUrl: 'start.html',
})
export class StartPage {


  constructor(public navCtrl: NavController, public navParams: NavParams,public public_var: PublicProvider) {
  }

  ionViewDidLoad() {
  }
  ionViewDidEnter(){
    this.public_var.timeout1 = setTimeout(() => {this.navCtrl.push(LoginPage);}, 2000);
  }
  // auto_go(){
  //   this.public_var.timeout1 = setTimeout(() => {this.navCtrl.push(LoginPage);}, 3000);
  // }


  goto_login(){
    this.navCtrl.push(LoginPage);
  }
}
